import {
    createRouter,
    createWebHistory
} from 'vue-router'

const routes = [{
        path: '/',
        name: 'index',
        component: () => import("../views/Index.vue"),
    },
    {
        path: '/login',
        name: 'login',
        component: () => import("../views/user/Login.vue")
    },
    {
        path: '/register',
        name: 'register',
        component: () => import("../views/user/Register.vue")
    },
    {
        path: '/findPassword',
        name: 'findPassword',
        component: () => import("../views/user/FindPassword.vue")
    },
    {
        path: '/userInfo',
        name: 'userInfo',
        component: () => import("../views/user/UserInfo.vue")
    },
    {
        path: '/commodity',
        name: 'commodity',
        component: () => import("../views/commodity/Index.vue")
    },
    {
        path: '/shoppingCart',
        name: 'shoppingCart',
        component: () => import("@/views/shoppingCart/Index.vue")
    },
    {
        path: '/search',
        name: 'search',
        component: () => import("@/views/search/Index.vue")
    },
    {
        path: '/order',
        name: 'order',
        component: () => import("@/views/order/Index.vue")
    },
    {
        path: '/userSetting',
        name: 'userSetting',
        component: () => import("@/views/setting/Index.vue")
    },
    {
        path: '/commodity/comment',
        name: 'commodityComment',
        component: () => import("@/views/order/CommodityComment.vue")
    },
    {
        path: '/address',
        name: 'address',
        component: () => import("@/views/address/Index.vue")
    },
    {
        path: '/settlement',
        name: 'settlement',
        component: () => import("@/views/order/Settlement.vue")
    },
    {
        path: '/pay',
        name: 'pay',
        component: () => import("@/views/pay/Index.vue")
    },
    {
        path: '/store',
        name: 'store',
        component: () => import("@/views/store/Index.vue")
    },
    {
        path: '/orderDetail',
        name: 'orderDetail',
        component: () => import("@/views/orderDetail/Index.vue")
    },
    {
        path: '/test',
        name: 'test',
        component: () => import("@/views/user/test.vue")
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router